package com.JavaWeb.dao.user;

import com.JavaWeb.pojo.Role;
import com.JavaWeb.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.ListResourceBundle;

//接口
public interface UserDao {
    //得到要登录的账户
        public User getLoginUser(Connection connection, String userCode);

        //修改当前用户密码
    public int updatePwd(Connection connection, int id, String password)throws SQLException;

    //根据用户名或者角色名查询用户总数
    public int getUserCount(Connection connection, String username, int userRole) throws SQLException;
        // 通过条件查询-用户表记录数
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize)throws Exception;

    //增加用户
    public int add(Connection connection, User user);

    //通过userId删除user
    public int deleteUserById(Connection connection, Integer delId)throws Exception;

    //通过userId获取user
    public User getUserById(Connection connection, String id)throws Exception;

    //修改用户信息
    public int modify(Connection connection, User user)throws Exception;



}
